Skip to content

dgb: port LTC pool NodeImpl into impl/dgb (real node, replaces skeleton) - #134

Closed
frstrtr wants to merge 1 commit into
dgb/tracker-blockperiod-ssotfrom
dgb/node-impl
Closed

dgb: port LTC pool NodeImpl into impl/dgb (real node, replaces skeleton)#134
frstrtr wants to merge 1 commit into
dgb/tracker-blockperiod-ssotfrom
dgb/node-impl

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Stacked on #132 (→#131#129). Replaces the compiling node.cpp/node.hpp skeleton with the full pool-layer NodeImpl, ported near-mechanically from impl/ltc (namespace ltc→dgb; LevelDB net litecoin→digibyte).

node.cpp now compiles share_tracker.hpp + share_check.hpp into a REAL translation unit, exercising the chain-score path — this makes #132 (block_period-derived time_span) real and lets the smoke drive the score path.

  • node.hpp: BaseNode<dgb::Config, dgb::ShareChain, dgb::Peer>; async share downloader, tracker mutex/compute pipeline, broadcast/download, admin API. Config aggregator declared inline (dgb splits config_pool.hpp + config_coin.hpp, no config.hpp).
  • node.cpp: full run-loop (think, clean_tracker, prune, PPLNS window, heartbeat, outbound conn maintenance, whitelist/ban admin).
  • protocol_actual.cpp / protocol_legacy.cpp: per-message handlers.
  • config_pool.cpp / config_coin.cpp: Fileconfig load()/get_default(); config_coin.hpp gains YAML convert<> specializations for P2PData/RPCData.
  • CMakeLists.txt: dgb OBJECT lib mirrors ltc; target dgb builds clean.

m_coin_params(dgb::make_coin_params(...)) mirrors ltc/node.hpp:131-151 (consumes #129 factory + #131 oracle params).

Coin-isolation preserved: confined to src/impl/dgb/. Wiring c2pool-dgb executable (src/c2pool/ main_dgb.cpp + CMakeLists) is a separate slice, out of scope here.

Verified: cmake --build --target dgb → clean (EXIT=0).

HOLD merge — integrator batches with #129/#131/#132.

Replace the compiling node.cpp/node.hpp skeleton with the full pool-layer
NodeImpl, ported near-mechanically from impl/ltc (namespace ltc -> dgb;
LevelDB net names litecoin -> digibyte). node.cpp now compiles share_tracker.hpp
and share_check.hpp into a real translation unit, exercising the chain-score path.

- node.hpp: BaseNode<dgb::Config, dgb::ShareChain, dgb::Peer>, async share
  downloader, tracker mutex/compute pipeline, broadcast, download, admin API.
  Config aggregator (core::Config<PoolConfig, CoinConfig>) declared inline since
  the dgb tree splits config into config_pool.hpp + config_coin.hpp (no
  config.hpp aggregator header).
- node.cpp: full run-loop body (think, clean_tracker, prune, PPLNS window,
  heartbeat, outbound connection maintenance, whitelist/ban admin).
- protocol_actual.cpp / protocol_legacy.cpp: per-message handlers (Actual/Legacy).
- config_pool.cpp / config_coin.cpp: Fileconfig load()/get_default() bodies;
  config_coin.hpp gains the YAML convert<> specializations for P2PData/RPCData.
- CMakeLists.txt: add dgb OBJECT lib (mirrors ltc lib) linking
  core/pool/sharechain/dgb_coin/btclibs/c2pool_storage/secp256k1; the dgb
  NodeImpl TU builds clean (target dgb).

Coin-isolation preserved: changes confined to src/impl/dgb/. Wiring the
c2pool-dgb executable to this lib requires edits in src/c2pool/ (main_dgb.cpp
+ CMakeLists.txt) which are out of scope for this slice.
@frstrtr

frstrtr commented Jun 18, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #145 (DGB Phase-B batch land #132->#142, operator-approved merge-as-reviewed; content incl. this PR verified present in the batch). Landed to master via #145.

@frstrtr frstrtr closed this Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant